﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
namespace DAO
{
    
    public class DoiXeDAO
    {
        #region "Tiếp nhận xe mới"
        public static void TiepNhanXeMoi(XE _Xe)
        {
            DoiXeVinamilkDataContext DoiXe = new DoiXeVinamilkDataContext();


            List<XE> ie = new List<XE>();
            ie.Add(_Xe);
            DoiXe.XEs.InsertAllOnSubmit(ie);
            DoiXe.SubmitChanges();
        }
    #endregion

        #region "Lấy Danh Sách Xe"
        public static IEnumerable<XE> LayDanhSachXe()
        {
            DoiXeVinamilkDataContext DoiXe = new DoiXeVinamilkDataContext();

            var XE = from p in DoiXe.XEs
                     select p;

            return XE;
        }
        #endregion

        //public static TiepNhanDiaDiem()
        //{

        //}

    }
}
